/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   PublicAVLTree.h
 * Author: Administrator
 *
 * Created on 2018年2月12日, 上午11:14
 */

#ifndef PUBLICAVLTREE_H
#    define PUBLICAVLTREE_H

#    ifdef __cplusplus
extern "C" {
#    endif
#include<stdint.h>

//定义句柄
typedef void* AVLTREEHANDLE;
//定义如何处理数据
typedef int (*AVLTreeFun)(uint64_t key,void*data);
//插入数据
AVLTREEHANDLE AVLTreeInsert(AVLTREEHANDLE hHandle,uint64_t key,void*data);
//删除数据
AVLTREEHANDLE AVLTreeDelete(AVLTREEHANDLE hHandle,uint64_t key,AVLTreeFun pFun);
//更新数据
AVLTREEHANDLE AVLTreeUpdate(AVLTREEHANDLE hHandle,uint64_t key,AVLTreeFun pFun);
//搜索数据
void* AVLTreeSearch(AVLTREEHANDLE hHandle,uint64_t key);
//遍历数据
void AVLTreeLookUp(AVLTREEHANDLE hHandle,AVLTreeFun pFun);
//清空数据
AVLTREEHANDLE AVLTreeClean(AVLTREEHANDLE hHandle,AVLTreeFun pFun);
#    ifdef __cplusplus
}
#    endif

#endif /* PUBLICAVLTREE_H */

